<template>
	<view class="page" :style="themeColor">
		<view
			class="flex flex-direction flex-wrap align-stretch justify-center benben-position-layout flex feedBack1666772448_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-stretch justify-between feedBack1666772448_fd0_0'>
				<view class='flex flex-wrap align-center feedBack1666772448_fd0_0_c0' @tap.stop="handleJumpDiy"
					data-type="back" data-url="1">
					<text class='fu-iconfont2  feedBack1666772448_fd0_0_c0_c0'>&#xe794;</text>
				</view>
				<view class='flex flex-wrap align-center'>
					<text class='feedBack1666772448_fd0_0_c1_c0'>我要反馈</text>
				</view>
				<view class='flex align-center justify-end feedBack1666772448_fd0_0_c2' @tap.stop="handleJumpDiy"
					data-type="navigateTo" :data-url="`/pages/xtsz/feedBackDetail/feedBackDetail`">
					<text class='feedBack1666772448_fd0_0_c2_c0'>反馈记录</text>
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		<!---意见反馈表单flex布局开始-->
		<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout feedBack1666772448_flex_1">
			<view class='flex flex-wrap align-center feedBack1666772448_fd1_0'>
				<text class='feedBack1666772448_fd1_0_c0'>反馈类型</text>
			</view>
			<view class='flex flex-direction flex-wrap align-stretch feedBack1666772448_fd1_1'>
				<benben-select-diy ref="showSelectPopup1661392431678" class-name='flex flex-wrap align-center flex'
					:items.sync="changeType" v-model="changeId" default-type="id" default-label="title"
					:allow-cancel='false' type="radio" :disabled='false'>
					<template v-for='(item,key0) in changeType'>
						<view v-if="item.isSelected"
							class='flex align-center justify-center flex feedBack1666772448_fd1_1_c0_c0' :key="key0"
							@tap="$refs.showSelectPopup1661392431678.tapHandle(key0)">
							<text class='flex-sub feedBack1666772448_fd1_1_c0_c0_c0'>{{item.title}}</text>
						</view>
						<view v-else class='flex align-center justify-center flex feedBack1666772448_fd1_1_c0_c1'
							:key="key0" @tap="$refs.showSelectPopup1661392431678.tapHandle(key0)">
							<text class='flex-sub feedBack1666772448_fd1_1_c0_c1_c0'>{{item.title}}</text>
						</view>
					</template></benben-select-diy>
			</view>
			<text class='feedBack1666772448_fd1_2'>反馈内容</text>
			<view class='flex flex-direction flex-wrap align-stretch feedBack1666772448_fd1_3'>
				<view class='flex flex-wrap feedBack1666772448_fd1_3_c0'>
					<textarea class='flex feedBack1666772448_input_fd1_3_c0' confirm-type="done"
						:placeholder="'问题描述的越详细，有助于我们更快的解决问题'" :maxlength="240"
						placeholder-style="color:#999;font-size:28rpx" v-model="body" />

				</view>
				<view class='flex flex-direction flex-wrap align-stretch'>
					<benben-images-upload ref="benbenImagesUploadfd1_3_c1_c0" :img-list.sync="imgs"
						:img-ids.sync="thumb" :is-show-tips='true' :maxlength="6">
						<template #content="{ num, maxlength, isShow, imgList }">
							<view class="flex flex-wrap align-start flex feedBack1666772448_fd1_3_c1_c0">

								<view v-for="(image, index) in imgList" :key="index"
									class='flex position-relative feedBack1666772448_fd1_3_c1_c00'>
									<text class='fu-iconfont2 position-absolute feedBack1666772448_fd1_3_c1_c000'
										@tap.stop="$refs.benbenImagesUploadfd1_3_c1_c0.delImage(index)">&#xE8E7;</text>
									<image class='feedBack1666772448_fd1_3_c1_c001'
										@tap.stop="$refs.benbenImagesUploadfd1_3_c1_c0.previewImage(index)"
										mode="aspectFill" :src='image'></image>
								</view>

								<image class='feedBack1666772448_fd1_3_c1_c01'
									@tap.stop="$refs.benbenImagesUploadfd1_3_c1_c0.manyChooseImage()" v-if="isShow"
									mode="aspectFill" :src='STATIC_URL+"60.jpg"'></image>
								<text class='image_upload_tips feedBack1666772448_fd1_3_c1_c02'>请上传应用截图，最多上传6张</text>
							</view>
						</template>
					</benben-images-upload>
				</view>
			</view>
		</view>
		<!---意见反馈表单flex布局结束-->
		<view class="flex flex-wrap align-center justify-center benben-position-layout flex feedBack1666772448_flex_2">
			<button class='flex-sub feedBack1666772448_fd2_0' @tap.stop="getsubmit()">提交</button>

		</view>
		<view :style="{height: '88rpx'}"></view>


	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				"changeId": "1",
				"changeType": [],
				"body": "",
				"thumb": "",
				"imgs": [],
				"is_submit": false
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getdataList();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取投诉类型
			async getdataList() {
				//请求方法
				//数据验证
			
				let dataListData = await this.$api.post(global.apiUrls.post643673e44610e, {
			
				});
				if (dataListData.data.code != 1) {
					this.$message.info(dataListData.data.msg);
					return
				}
				let dataListinfo = dataListData.data;
				this.changeType = dataListinfo.data;
				this.changeId = this.changeType[0].id;
			
			},
			//提交意见反馈
			async getsubmit() {
				if (this.is_submit) return;
			
				//请求方法
				//数据验证
				if (!this.body) {
					this.$message.info('请输入反馈内容');
					return;
				}
				this.is_submit = true;
				let gniData = await this.$api.post(global.apiUrls.post643673fde25cd, {
					body: this.body,
					thumb: this.imgs.length > 0 ? this.imgs.join(',') : '',
					operationsuggestionstype_id: this.changeId
				});
				this.is_submit = false;
				if (gniData.data.code != 1) {
					this.$message.info(gniData.data.msg);
					return
				}
				let gniinfo = gniData.data;
				this.$message.info(gniData.data.msg);
				setTimeout(() => {
					this.$urouter.redirectTo(`/pages/xtsz/feedBackDetail/feedBackDetail`);
				}, 800)
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto !important;
	}

	.feedBack1666772448_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.feedBack1666772448_fd0_0_c2_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: rgba(56, 122, 236, 1);
	}

	.feedBack1666772448_fd0_0_c2 {
		padding: 0rpx 0rpx 0rpx 0rpx;
		width: 200rpx;
	}

	.feedBack1666772448_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
		line-height: 50rpx;
	}

	.feedBack1666772448_fd0_0_c0_c0 {
		font-size: 36rpx;
		font-weight: 400;
		color: #333;
	}

	.feedBack1666772448_fd0_0_c0 {
		width: 200rpx;
	}

	.feedBack1666772448_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.feedBack1666772448_flex_1 {
		background: #fff;
		background-size: 100% auto !important;
	}

	.feedBack1666772448_fd1_3_c1_c02 {
		font-size: 24rpx;
		color: rgba(191, 191, 191, 1);
		font-weight: 400;
		width: 100%;
	}

	.feedBack1666772448_fd1_3_c1_c01 {
		width: 160rpx;
		height: 160rpx;
		margin: 0rpx 24rpx 24rpx 0rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.feedBack1666772448_fd1_3_c1_c001 {
		width: 160rpx;
		height: 160rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.feedBack1666772448_fd1_3_c1_c000 {
		top: 0rpx;
		right: 0rpx;
		z-index: 10;
		color: #ff5536;
	}

	.feedBack1666772448_fd1_3_c1_c00 {
		margin: 0rpx 24rpx 24rpx 0rpx;
	}

	.feedBack1666772448_fd1_3_c1_c0 {
		padding: 24rpx 0rpx 0rpx 24rpx;
	}

	.feedBack1666772448_input_fd1_3_c0 {
		width: 100%;
		height: 166rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
	}

	.feedBack1666772448_fd1_3_c0 {
		width: 686rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		margin: 0rpx 0rpx 0rpx 32rpx;
		padding: 0rpx 0rpx 24rpx 0rpx;
	}

	.feedBack1666772448_fd1_3 {
		margin: 0rpx 0rpx 32rpx 0rpx;
	}

	.feedBack1666772448_fd1_2 {
		font-size: 32rpx;
		font-weight: 500;
		color: #1A1A1A;
		line-height: 45rpx;
		margin: 32rpx 0rpx 32rpx 32rpx;
	}

	.feedBack1666772448_fd1_1_c0_c1_c0 {
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(153, 153, 153, 1);
		line-height: 62rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		text-align: center;
	}

	.feedBack1666772448_fd1_1_c0_c1 {
		border: 1px solid rgba(191, 191, 191, 1);
		background: #fff;
		margin: 16rpx 16rpx 16rpx 16rpx;
		height: 64rpx;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		width: 206rpx;
		padding: 0rpx 10rpx 0rpx 10rpx;
	}

	.feedBack1666772448_fd1_1_c0_c0_c0 {
		font-size: 28rpx;
		font-weight: 400;
		color: #fff;
		line-height: 62rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		text-align: center;
	}

	.feedBack1666772448_fd1_1_c0_c0 {
		background: rgba(238, 63, 77, 1);
		margin: 16rpx 16rpx 16rpx 16rpx;
		height: 64rpx;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		width: 206rpx;
		padding: 0rpx 10rpx 0rpx 10rpx;
	}

	.feedBack1666772448_fd1_1 {
		border-bottom: 10px solid rgba(246, 247, 248, 1);
		padding: 0rpx 16rpx 16rpx 16rpx;
	}

	.feedBack1666772448_fd1_0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #1A1A1A;
		margin: 0rpx 32rpx 0rpx 32rpx;
	}

	.feedBack1666772448_fd1_0 {
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.feedBack1666772448_flex_2 {
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		bottom: calc(48rpx + var(--window-bottom));
	}

	.feedBack1666772448_fd2_0 {
		background: rgba(238, 63, 77, 1);
		border-radius: 100rpx 100rpx 100rpx 100rpx;
		font-size: 32rpx;
		color: #fff;
		margin: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
		line-height: 88rpx;
		width: 686rpx;
		font-weight: 400;
	}
</style>